import App from './App'
import api from './common/api.js'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import html2canvas from 'html2canvas'

import share from '@/mixins/share.js'
import uView from "uview-ui";
Vue.use(uView);

Vue.config.productionTip = false
App.mpType = 'app'
Vue.prototype.$api = api
Vue.prototype.$appId = 'wxa14895afade53c16'
let myPartnerCode = uni.getStorageSync('myPartnerCode');
let myCityName = uni.getStorageSync('myCityName');
let myUserType = uni.getStorageSync('myUserType');
Vue.mixin(share(
	'推荐你一款海报制作、打卡返现工具，朋友都在用',
	myPartnerCode && myCityName && myUserType ?
	'pages/index/index?parentPartnerCode=' + myPartnerCode + '&parentCityName=' + myCityName +
	'&parentUserType=' + myUserType :
	'pages/index/index'
));
Vue.prototype.$innerAudioContext = wx.createInnerAudioContext({
	useWebAudioImplement: true // 是否使用 WebAudio 作为底层音频驱动，默认关闭。对于短音频、播放频繁的音频建议开启此选项，开启后将获得更优的性能表现。由于开启此选项后也会带来一定的内存增长，因此对于长音频建议关闭此选项
})

import store from './store/index.js'

const app = new Vue({
	store: store,
	...App
})



app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif